package com.liuugoqing.behavioral.visitor.casedemo;

/**
 * @Author : liugq
 * @Date : 2022/7/15 21:35
 * @See : 参考类
 * @Since： JDK1.8
 * @Version : 1.0
 */
public class TestVisitor {
    public static void main(String[] args) {

        Home home = new Home();
        home.add(new Cat());
        home.add(new Dog());

        Person owner = new Owner();
        Person someone = new Someone();

        home.action(someone);
    }
}
